package com.huirui.server.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 商品规格表
 *
 * @TableName t_product_specification
 */
@TableName(value = "t_product_specification")
@Data
@Accessors(fluent = true)
public class ProductSpecification implements Serializable {
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public BigDecimal getPromotionalPrice() {
        return promotionalPrice;
    }

    public void setPromotionalPrice(BigDecimal promotionalPrice) {
        this.promotionalPrice = promotionalPrice;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public String getSpecificationName() {
        return specificationName;
    }

    public void setSpecificationName(String specificationName) {
        this.specificationName = specificationName;
    }

    public String getSpecificationImageUrl() {
        return specificationImageUrl;
    }

    public void setSpecificationImageUrl(String specificationImageUrl) {
        this.specificationImageUrl = specificationImageUrl;
    }

    public BigDecimal getDiscountPrice() {
        return discountPrice;
    }

    public void setDiscountPrice(BigDecimal discountPrice) {
        this.discountPrice = discountPrice;
    }

    public BigDecimal getOriginalPrice() {
        return originalPrice;
    }

    public void setOriginalPrice(BigDecimal originalPrice) {
        this.originalPrice = originalPrice;
    }

    public Long getSaleCount() {
        return saleCount;
    }

    public void setSaleCount(Long saleCount) {
        this.saleCount = saleCount;
    }

    public Integer getSpecificationSort() {
        return specificationSort;
    }

    public void setSpecificationSort(Integer specificationSort) {
        this.specificationSort = specificationSort;
    }

    public Integer getIsDefault() {
        return isDefault;
    }

    public void setIsDefault(Integer isDefault) {
        this.isDefault = isDefault;
    }

    public Integer getStock() {
        return stock;
    }

    public void setStock(Integer stock) {
        this.stock = stock;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    public BigDecimal getSeckillPrice() {
        return seckillPrice;
    }

    public void setSeckillPrice(BigDecimal seckillPrice) {
        this.seckillPrice = seckillPrice;
    }

    public Integer getAvailableStock() {
        return availableStock;
    }

    public void setAvailableStock(Integer availableStock) {
        this.availableStock = availableStock;
    }

    /**
     * 规格唯一标识
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 关联商品ID
     */
    @TableField(value = "product_id")
    private Long productId;

    /**
     * 规格名称
     */
    @TableField(value = "specification_name")
    private String specificationName;

    /**
     * 规格图
     */
    @TableField(value = "specification_image_url")
    private String specificationImageUrl;

    /**
     * 优惠售价
     */
    @TableField(value = "discount_price")
    private BigDecimal discountPrice;

    /**
     * 商品原价
     */
    @TableField(value = "original_price")
    private BigDecimal originalPrice;

    /**
     * 累计销量
     */
    @TableField(value = "sale_count")
    private Long saleCount;

    /**
     * 规格排序
     */
    @TableField(value = "specification_sort")
    private Integer specificationSort;

    /**
     * 默认规格（1-默认规格，0-不是默认规格）
     */
    @TableField(value = "is_default")
    private Integer isDefault;

    /**
     * 库存总量
     */
    @TableField(value = "stock")
    private Integer stock;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private LocalDateTime updateTime;

    /**
     * 秒杀价格
     */
    @TableField(value = "seckill_price")
    private BigDecimal seckillPrice;

    /**
     * 可用库存
     */
    @TableField(value = "available_stock")
    private Integer availableStock;

    /**
     * 促销价格
     */
    @TableField(value = "promotional_price")
    private BigDecimal promotionalPrice;

    @Serial
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}